<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>

<h:body>
	<h:form id="formLogin">
		<p:growl showDetail="true"></p:growl>
		<p:panel id="painelLogin" header="Login de Usuário">
			<p:messages id="globalMessage"></p:messages>
			<h:panelGrid columns="3">
				<h:outputLabel id="labelName" value="Nome:" for="textBoxName"></h:outputLabel>
				<p:inputText id="textBoxName" value="#{loginBean.login.user}"
					required="true" requiredMessage="O campo nome é necessário"></p:inputText>
				<p:message for="textBoxName" id="errorMessageName"></p:message>

				<h:outputLabel id="labelPassword" value="Senha:"
					for="textBoxPassword"></h:outputLabel>
				<p:password id="textBoxPassword" value="#{loginBean.login.password}"
					required="true" requiredMessage="O campo senha é necessário"></p:password>
				<p:message for="textBoxPassword" id="errorMessagePassword"></p:message>
			</h:panelGrid>
			<p:commandButton id="buttonAccess" value="Acessar" update="@form"
				action="#{loginBean.verifyLogin}"></p:commandButton>
			<p:blockUI block="painelLogin" trigger="buttonAccess">
				Autenticando usuário<br />
				<p:graphicImage value="images/authentic.gif" />
			</p:blockUI>
		</p:panel>
	</h:form>
</h:body>

</html>